<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Payment</title>
</head>
<center>
    契約書
   
    <table border=1>
         <?php 
        foreach ($query as $rows)
        {
        ?>
        <tr>
            
            <td>団体:</td>
            <td><?php echo $rows->id_mg ?></td>
        </tr>
         <tr>
            <?php $time_pieces = explode("-", $rows->payment_month) ;?>
            <td>時間</td>
            <td><?php echo $time_pieces[0]."年".$time_pieces[1]."月" ?></td>
        </tr>
        <tr>
            <td>アドレス</td>
            <td><?php echo $rows->address ?></td>
        </tr>
        <tr>
            <td>電話番号</td>
            <td><?php echo $rows->phone ?></td>
        </tr>
        <tr>
            <td>サブミットの代金</td>
            <td><?php echo $rows->money_per_test." VND"?></td>
        </tr>
        <tr>
            <td>サブミットしたテスト</td>
            <td><?php echo $rows->total_submit_this_month?></td>
        </tr>
        <tr>
            <td>合計代金</td>
            <td><?php echo $rows->total_money." VND"?></td>
        </tr>
        <?php 
        }
        ?>
    </table>
    <?php 
        echo "<br>";echo "<br>";echo $message;
    ?>
</center>
</body>
</html>